
<template>
    <div class="home-main">
        <Row :gutter="24">
            <Col :md="12" :lg="24" :style="{marginBottom: '10px'}">
                        <Card>
                            <Row type="flex" class="user-infor">
                                <Col span="4">
                                    <Row class-name="made-child-con-middle" type="flex" align="middle">
                                        <img class="avator-img" :src="avatorPath" />
                                    </Row>
                                </Col>
                                <Col span="20" style="padding-left:6px;">
                                    <Row class-name="made-child-con-middle" type="flex" align="middle">
                                        <div>
                                            <b class="card-user-infor-name">{{userName}}</b>
                                            <p>联系方式：{{tel}}</p>
                                        </div>
                                    </Row>
                                </Col>
                            </Row>
                            <div class="line-gray"></div>
                            <Row class="margin-top-8">
                                <Col span="4"><p class="notwrap">登录时间:</p></Col>
                                <Col span="20" class="padding-left-8">{{ loginDate }}</Col>
                            </Row>
                            <!-- <Row class="margin-top-8">
                                <Col span="8"><p class="notwrap">上次登录地点:</p></Col>
                                <Col span="16" class="padding-left-8">北京</Col>
                            </Row> -->
                        </Card>
                    </Col>
        </Row>

    </div>
</template>

<script>

import moment from "moment";
export default {
    name: 'home',
    components: {

    },
    data () {
        return {
            userName: '',
            tel: '',
            loginDate: ''
        }
    },
    computed: {
        avatorPath () {
            return localStorage.avatorImgPath
        }
    },
    methods: {
        init () {
            this.userName = localStorage.userName
            this.tel = localStorage.userTel
            this.loginDate = moment(localStorage.loginDate).format("YYYY-MM-DD hh:mm:ss")
        }
    },
    mounted () {
        this.init()
    }
}
</script>

<style lang="less">
    @import "./home.less";
    @import "../../styles/common.less";
</style>
